#ifndef DIALOG_H
#define DIALOG_H

#include <QDialog>
#include <QNetworkAccessManager>
#include <QNetworkReply>
#include <QUrl>
#include <QFile>
#include <QProgressDialog>

namespace Ui {
class Dialog;
}

class Dialog : public QDialog
{
    Q_OBJECT

public:
    explicit Dialog(QWidget *parent = 0);
    ~Dialog();

private slots:
    void on_downloadButton_clicked();
    void on_urlEdit_returnPressed();
    void on_quitButton_clicked();
private:
    Ui::Dialog *ui;
    quint64 fileSize;
    QFile* file;
    QNetworkAccessManager* manager;
    QNetworkReply* reply;
    QProgressDialog* progressDialog;
    bool httpRequestAborted;
    QUrl url;
};

#endif // DIALOG_H
